package cn.dy.workatten.service;

import java.util.Date;

import cn.dy.base.framework.esb.def.ESBAnnotation;
import cn.dy.base.framework.esb.def.RepMessage;

/**
 * @author Lucky 考勤管理服务
 */
public abstract interface WorkAttenService {

	/**
	 * 根据部门查询用户列表
	 * 
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "query", "pageNum", "pageSize" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage getContactInfoByDept(long dept_id, String query, long pageNum, long pageSize);

	/**
	 * 新增考勤
	 * 
	 * @param dateStr            {格式 yyyy-MM-dd}
	 * @param staff_Ids          员工id数组
	 * @param schedule_Ids       值班id数组。里面一个元素的格式如：1,2,4,8, (1:上午，2：下午，4：夜班，8：早中晚班)
	 * @param man_hour_midnights 0点后（时）数组
	 * @param work_values        额外分值数组
	 * @param audit1             一级审批人员 （审批人员每一级只有一个人）
	 * @param audit2             二级审批人员
	 * @param audit3             三级审批人员
	 * @param audit4             四级审批人员
	 * @param audit5             五级审批人员
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "dateStr", "staff_Ids", "schedule_Ids", "man_hour_midnights", "work_values",
			"audit1", "audit2", "audit3", "audit4",
			"audit5", "saveAndCommit" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage createNewWorkAtten(long dept_id, String dateStr, String[] staff_Ids,
			String[] schedule_Ids, String[] man_hour_midnights, String[] work_values, long audit1, long audit2,
			long audit3, long audit4, long audit5, long saveAndCommit);

	/**
	 * 修改考勤
	 * 
	 * @param dateStr            {格式 yyyy-MM-dd}
	 * @param staff_Ids          员工id数组
	 * @param schedule_Ids       值班id数组。里面一个元素的格式如：1,3,4
	 * @param man_hour_midnights 0点后（时）数组
	 * @param work_values        额外分值数组
	 * @param audit1             一级审批人员
	 * @param audit2             二级审批人员
	 * @param audit3             三级审批人员
	 * @param audit4             四级审批人员
	 * @param audit5             五级审批人员
	 * @return
	 */
	@ESBAnnotation(names = { "attend_application_id", "dept_id", "dateStr", "staff_Ids", "schedule_Ids",
			"man_hour_midnights", "work_values", "audit1", "audit2", "audit3", "audit4",
			"audit5" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage modifyWorkAtten(long attend_application_id, long dept_id, String dateStr,
			String[] staff_Ids, String[] schedule_Ids, String[] man_hour_midnights, String[] work_values, long audit1,
			long audit2, long audit3, long audit4, long audit5);

	/**
	 * 提交审批
	 * 
	 * @param attend_application_id
	 * @return
	 */
	@ESBAnnotation(names = { "attend_application_id" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage commitAudit(long attend_application_id);

	/**
	 * 撤回审批
	 * 
	 * @param attend_application_id
	 * @return
	 */
	@ESBAnnotation(names = { "attend_application_id" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage revokeAudit(long attend_application_id);

	/**
	 * 审批考勤
	 * 
	 * @param attend_application_id 考勤申请表id
	 * @param isPass                是否通过审批
	 * @return
	 */
	@ESBAnnotation(names = { "attend_application_id", "audit_sts",
			"audit_remark" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage auditWorkAttend(long attend_application_id, String audit_sts, String audit_remark);

	/**
	 * 考勤录入、审批列表，分页查询（根据权限）dept_id, audit_sts, "beginTime", "endTime"
	 * 
	 * @param dept_id
	 * @param audit_sts
	 * @param beginTime
	 * @param endTime
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "audit_sts", "beginTime", "endTime", "pageNum", "pageSize" }, req_login = false)
	public abstract RepMessage queryWorkAttendList(long dept_id, String audit_sts, Date beginTime, Date endTime,
			int pageNum, int pageSize);
	
	/**
	 * 考勤录入列表，分页查询（根据权限）dept_id, audit_sts, "beginTime", "endTime"
	 * 	具有部门考勤管理功能权限的人员进入该页面后，可以查看自己录入的所有数据。
	 * @param dept_id
	 * @param audit_sts
	 * @param beginTime
	 * @param endTime
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "audit_sts", "beginTime", "endTime", "pageNum", "pageSize" }, req_login = false)
	public abstract RepMessage queryAddWorkAttendList(long dept_id, String audit_sts, Date beginTime, Date endTime,
			int pageNum, int pageSize);
	
	/**
	 * 	考勤审批列表，分页查询（根据权限）dept_id, audit_sts, "beginTime", "endTime"
	 * 	显示提交给我的数据
	 * @param dept_id
	 * @param audit_sts
	 * @param beginTime
	 * @param endTime
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "audit_sts", "beginTime", "endTime", "pageNum", "pageSize" }, req_login = false)
	public abstract RepMessage queryAuditWorkAttendList(long dept_id, String audit_sts, Date beginTime, Date endTime,
			int pageNum, int pageSize);

	/**
	 * 考勤详情查看
	 * 
	 * @param attend_application_id 考勤申请表id
	 * @return
	 */
	@ESBAnnotation(names = { "attend_application_id" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage getWorkAttendDetail(long attend_application_id);

	
	
	/**
	 * 考勤详情查看
	 * 根据条件查询
	 * @return
	 */
	@ESBAnnotation(names = { "dept_id", "monthStr", "searchStr", "pageNum", "pageSize" }, req_login = false, req_log = true, record_log_detail = true)
	public abstract RepMessage getWorkAttendDetailByDay(long dept_id, String monthStr, String searchStr, int pageNum, int pageSize);
	
	
	/**
	 * 	导出某个部门，某个月份的所有员工考勤信息
	 * @return
	 */
	@ESBAnnotation(names={"dept_id", "monthStr"}, req_login=false, req_log=true, record_log_detail=true)
    public abstract RepMessage getExportWorkAttend(long dept_id, String monthStr);
	
	
}
